package com.aidex.baseinfo.domain;

import java.math.BigDecimal;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.aidex.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aidex.common.utils.log.annotation.FieldRemark;
import com.aidex.common.utils.log.annotation.LogField;
import com.aidex.common.annotation.Excel;

/**
 * 商品信息表对象 base_goodsinfo
 * @author cq
 * @email 382425530@qq.com
 * @date 2023-06-19
 */
@Data
public class BaseGoodsinfo extends BaseEntity<BaseGoodsinfo>
{
    private static final long serialVersionUID = 1L;

    /** 商品名称 */
    @Excel(name = "商品名称")
    @NotBlank(message = "商品名称不允许为空")
    @LogField
    @FieldRemark(name = "商品名称",field = "goodsName")
    private String goodsName;

    /** 商品描述 */
    @Excel(name = "商品描述")
    @NotBlank(message = "商品描述不允许为空")
    @LogField
    @FieldRemark(name = "商品描述",field = "goodsDes")
    private String goodsDes;

    /** 商品价格 */
    @Excel(name = "商品价格")
    @LogField
    @FieldRemark(name = "商品价格",field = "price")
    private BigDecimal price;

    /** 商品重量 */
    @Excel(name = "商品重量")
    @LogField
    @FieldRemark(name = "商品重量",field = "weight")
    private BigDecimal weight;

    /** 商品类别 */
    @Excel(name = "商品类别")
    @NotBlank(message = "商品类别不允许为空")
    @LogField
    @FieldRemark(name = "商品类别",field = "category")
    private String category;

    /** 供应商id */
    @Excel(name = "供应商id")
    @NotBlank(message = "供应商id不允许为空")
    @LogField
    @FieldRemark(name = "供应商id",field = "supplierId")
    private String supplierId;

    /** 有效期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd")
    @LogField
    @FieldRemark(name = "有效期",field = "validity")
    private Date validity;

    /** 有效期开始 */
    private String beginValidity;

    /** 有效期结束 */
    private String endValidity;
	
    /** 状态 */
    @NotBlank(message = "状态不允许为空")
    @LogField
    @FieldRemark(name = "状态",field = "state")
    private String state;

    public void setGoodsName(String goodsName) 
    {
        this.goodsName = goodsName;
    }

    public String getGoodsName() 
    {
        return goodsName;
    }

    public void setGoodsDes(String goodsDes) 
    {
        this.goodsDes = goodsDes;
    }

    public String getGoodsDes() 
    {
        return goodsDes;
    }

    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }

    public void setWeight(BigDecimal weight) 
    {
        this.weight = weight;
    }

    public BigDecimal getWeight() 
    {
        return weight;
    }

    public void setCategory(String category) 
    {
        this.category = category;
    }

    public String getCategory() 
    {
        return category;
    }

    public void setSupplierId(String supplierId) 
    {
        this.supplierId = supplierId;
    }

    public String getSupplierId() 
    {
        return supplierId;
    }

    public void setValidity(Date validity) 
    {
        this.validity = validity;
    }

    public Date getValidity() 
    {
        return validity;
    }

    public void setState(String state) 
    {
        this.state = state;
    }

    public String getState() 
    {
        return state;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("goodsName", getGoodsName())
            .append("goodsDes", getGoodsDes())
            .append("price", getPrice())
            .append("weight", getWeight())
            .append("category", getCategory())
            .append("supplierId", getSupplierId())
            .append("validity", getValidity())
            .append("state", getState())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
